home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / InstallMaster 7.03 / Devfulldemo.exe / file0215.bin < prev    next >
Encoding:
Wise script  |  1999-04-26  |  3.8 KB  |  178 lines

  1. Document Type: WSE
  2. item: Global
  3.   Version=6.0
  4.   Title=Application kill.
  5.   Flags=00000100
  6.   Split=1420
  7.   Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  8.   Japanese Font Name=MS Gothic
  9.   Japanese Font Size=10
  10.   Start Gradient=0 0 255
  11.   End Gradient=0 0 0
  12.   Windows Flags=00000100000000000010110000001000
  13.   Message Font=MS Sans Serif
  14.   Font Size=8
  15.   Disk Filename=SETUP
  16.   Patch Flags=0000000000000001
  17.   Patch Threshold=85
  18.   Patch Memory=4000
  19.   FTP Cluster Size=20
  20. end
  21. item: Remark
  22. end
  23. item: Remark
  24.   Text=This script will detect if MS Word is running and ask if you would like to terminate it.
  25. end
  26. item: Remark
  27. end
  28. item: Remark
  29.   Text=Set FINDAPP to the Applicaiton you wish to terminate
  30. end
  31. item: Set Variable
  32.   Variable=FINDAPP
  33.   Value=Microsoft Word
  34. end
  35. item: Remark
  36. end
  37. item: Remark
  38.   Text=The following variables should not be modified.
  39. end
  40. item: Remark
  41.   Text=They are the maximum preallocated space in a variable for a Title and Class
  42. end
  43. item: Set Variable
  44.   Variable=LEN
  45.   Value=250
  46. end
  47. item: Set Variable
  48.   Variable=CLASSLEN
  49.   Value=250
  50. end
  51. item: Remark
  52.   Text=First find the Desktop Window Handle
  53. end
  54. item: Call DLL Function
  55.   Pathname=%SYS%\USER32.DLL
  56.   Function Name=GetDesktopWindow
  57.   Return Variable=3DESKTOPWIN
  58.   Flags=00100000
  59. end
  60. item: Remark
  61.   Text=Then get the first Window Handle based on the Z order
  62. end
  63. item: Call DLL Function
  64.   Pathname=%SYS%\USER32.DLL
  65.   Function Name=GetWindow
  66.   Argument List=30DESKTOPWIN
  67.   Argument List=215
  68.   Return Variable=3FIRSTWIN
  69.   Flags=00100000
  70. end
  71. item: If/While Statement
  72.   Variable=FIRSTWIN
  73.   Value=0
  74.   Flags=00010001
  75. end
  76. item: Remark
  77.   Text=Get the class name and window title for this window
  78. end
  79. item: Remark
  80.   Text=The Class name is not needed for this example
  81. end
  82. item: Call DLL Function
  83.   Pathname=%SYS%\USER32.DLL
  84.   Function Name=GetClassNameA
  85.   Argument List=30FIRSTWIN
  86.   Argument List=40WINCLASS
  87.   Argument List=20LEN
  88.   Return Variable=2RETURNCLASS
  89.   Flags=00100000
  90. end
  91. item: Call DLL Function
  92.   Pathname=%SYS%\USER32.DLL
  93.   Function Name=GetWindowTextA
  94.   Argument List=30FIRSTWIN
  95.   Argument List=40WINTITLE
  96.   Argument List=20LEN
  97.   Return Variable=2RETURNVAL
  98.   Flags=00100000
  99. end
  100. item: If/While Statement
  101.   Variable=WINTITLE
  102.   Flags=00000001
  103. end
  104. item: Remark
  105.   Text=Uncomment this message to see all the Windows with titles
  106. end
  107. remarked item: Display Message
  108.   Title=Application Window Title
  109.   Text=%WINTITLE%
  110. end
  111. item: End Block
  112. end
  113. item: If/While Statement
  114.   Variable=WINTITLE
  115.   Value=%FINDAPP%
  116.   Flags=00000010
  117. end
  118. item: Display Message
  119.   Title=Application is Active
  120.   Text=The %FINDAPP% Application is active.
  121.   Text=
  122.   Text=Would you like to terminate it?
  123.   Flags=00000001
  124. end
  125. item: Remark
  126.   Text=Send WM_CANCELMODE to drop any modal dialogs
  127. end
  128. item: Call DLL Function
  129.   Pathname=%SYS%\USER32.DLL
  130.   Function Name=PostMessageA
  131.   Argument List=30FIRSTWIN
  132.   Argument List=3131
  133.   Argument List=310
  134.   Argument List=310
  135.   Return Variable=0RETURNVAL
  136.   Flags=00100000
  137. end
  138. item: Remark
  139.   Text=Send WM_CLOSE to have the application exit
  140. end
  141. item: Call DLL Function
  142.   Pathname=%SYS%\USER32.DLL
  143.   Function Name=PostMessageA
  144.   Argument List=30FIRSTWIN
  145.   Argument List=3116
  146.   Argument List=310
  147.   Argument List=310
  148.   Return Variable=0RETURNVAL
  149.   Flags=00100000
  150. end
  151. item: Remark
  152.   Text=Bring the window to the foreground if it is still there.
  153. end
  154. item: Remark
  155.   Text=It could be that it is waiting for input.
  156. end
  157. item: Call DLL Function
  158.   Pathname=%SYS%\USER32.DLL
  159.   Function Name=SetForegroundWindow
  160.   Argument List=30FIRSTWIN
  161.   Return Variable=0
  162.   Flags=00100000
  163. end
  164. item: End Block
  165. end
  166. item: End Block
  167. end
  168. item: Call DLL Function
  169.   Pathname=%SYS%\USER32.DLL
  170.   Function Name=GetWindow
  171.   Argument List=30FIRSTWIN
  172.   Argument List=212
  173.   Return Variable=3FIRSTWIN
  174.   Flags=00100000
  175. end
  176. item: End Block
  177. end
  178.